package com.liu.design.behavior.observer;

import java.util.ArrayList;
import java.util.List;

/**
 * @author LIU
 * @version 1.0
 * @description: 粉丝抽象类
 * @date 2022/12/20 10:37
 */
public abstract class AbstractFans {

    List<AbstractTiktok> tiktokList= new ArrayList<>();

    //粉丝接受通知
    abstract void acceptMsg(String msg);

    //粉丝关注方法
    void follow(AbstractTiktok tiktok){
        //关注主播
        tiktok.addFans(this);

        //双向观察
//        for (AbstractTiktok abstractTiktok : tiktokList) {
//
//        }
    }
}
